Skip to content

Revert "chore: backfill email-domain member organization dates (CM-1107)"#4063

Merged
skwowet merged 1 commit intoimprove/CM-1105from
revert-4061-script/CM-1107
Apr 28, 2026
Merged

Revert "chore: backfill email-domain member organization dates (CM-1107)"#4063
skwowet merged 1 commit intoimprove/CM-1105from
revert-4061-script/CM-1107

Conversation

@skwowet
Copy link
Copy Markdown
Collaborator

@skwowet skwowet commented Apr 28, 2026

Reverts #4061

Copilot AI review requested due to automatic review settings April 28, 2026 13:01
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR titles must follow Conventional Commits. Love from, Your reviewers ❤️.

@skwowet skwowet merged commit d07c84e into improve/CM-1105 Apr 28, 2026
6 of 8 checks passed
@skwowet skwowet deleted the revert-4061-script/CM-1107 branch April 28, 2026 13:02
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Reverts the previously added “email-domain member organization dates” backfill tooling by removing the backfill script and the supporting data-access-layer query/types, while also changing the Redis key used to queue member affiliation recalculations in the script executor worker.

Changes:

  • Removed the backfill script (backfill-email-domain-member-organization-dates.ts) and its package.json script entry.
  • Removed DAL types and query helpers used by the backfill (email-domain activity date fetchers).
  • Renamed the Redis set key used for queuing member affiliation recalculation.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
services/libs/data-access-layer/src/members/types.ts Removes MemberOrgDate-based email-domain backfill type.
services/libs/data-access-layer/src/members/organizations.ts Removes email-domain backfill query helpers.
services/apps/script_executor_worker/src/activities/block-project-organization-affiliations.ts Renames Redis set key used to enqueue/dequeue member IDs for affiliation recalculation.
backend/src/bin/scripts/backfill-email-domain-member-organization-dates.ts Deletes the backfill script (revert).
backend/package.json Removes npm script entry for the deleted backfill script.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 59 to +70
@@ -67,7 +67,7 @@ export async function markMemberForAffiliationRecalc(memberIds: string[]): Promi

export async function getMembersForAffiliationRecalc(batchSize: number): Promise<string[]> {
try {
return svc.redis.sPop('recalculate-member-affiliations', batchSize)
return svc.redis.sPop('queue:recalculate:members:affiliation', batchSize)
Copy link

Copilot AI Apr 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change renames the Redis set key used to queue member IDs for affiliation recalculation. Any members already queued under the old key will no longer be processed (they’ll remain stranded in the old set). Consider reading/draining from both keys temporarily or adding a one-time migration/drain step before switching the producer/consumer to the new key.

Copilot uses AI. Check for mistakes.
Comment on lines 59 to +70
@@ -67,7 +67,7 @@ export async function markMemberForAffiliationRecalc(memberIds: string[]): Promi

export async function getMembersForAffiliationRecalc(batchSize: number): Promise<string[]> {
try {
return svc.redis.sPop('recalculate-member-affiliations', batchSize)
return svc.redis.sPop('queue:recalculate:members:affiliation', batchSize)
Copy link

Copilot AI Apr 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR title/description indicate this is a revert of the email-domain backfill script, but this hunk introduces a Redis key rename for the affiliation recalculation queue. If this rename is intended, the PR description should mention it; otherwise it should likely be reverted as part of this revert PR.

Copilot uses AI. Check for mistakes.
skwowet added a commit that referenced this pull request Apr 28, 2026
…07)" (#4063)

Signed-off-by: Yeganathan S <63534555+skwowet@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants